<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="bootstrap.min.css">
</head>
<body>
<!--form表单；label显示内容；placeholder表示输入框占位符；form-inline表示内联表单，输入框宽度自适应-->
    <form role="form" class="form-inline">
        <!--输入框-->
        <div class="form-group">
            <label>日期</label>
            <input type="date" class="form-control" placeholder="user">
        </div>
        <div class="form-group">
            <label>Email</label>
            <input type="email" class="form-control" placeholder="请输入Email">
        </div>
        <div class="form-group">
            <label>密码</label>
            <input type="password" class="form-control" placeholder="请输入密码">
        </div>
        <!--选择文件框-->
        <div class="form-group">
            <!--sr-only表示隐藏label框，如果用内联表单的话必须有label才行-->
            <label class="sr-only">选择文件</label>
            <input type="file">
            <p class="help-block">选择你的文件</p>
        </div>
    </form>

<!--form-horizontal表示水平表单,会有部分字被遮挡，可以用栅格系统调整，例如col-sm-2和col-sm-10-->
    <form class="form-horizontal" role="form">
        <div class="form-group">
            <label class="col-sm-2 control-label">请输入Email</label>
            <div class="col-sm-10">
                <input type="email" class="form-control" placeholder="Email">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">请输入Password</label>
            <div class="col-sm-10">
                <input type="password"  class="form-control" placeholder="Password">
            </div>
        </div>
        <!--checkbox是复选框，为了让此复选框对齐，给此复选框col-sm-10并让他偏移2格col-sm-offset-2-->
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <div class="checkbox">
                    <label>
                        <input type="checkbox">记住密码
                    </label>
                </div>
            </div>
        </div>
    <!--submit是提交按钮，btn-default是按钮默认样式-->
        <div>
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-default">登陆</button>
            </div>
        </div>
    </form>
</body>
</html>

